require 'active_record'

class Garantia < ActiveRecord::Base
  #Asociaciones
  belongs_to :garante, :class_name => "Persona", :foreign_key => "garante_id"
  belongs_to :beneficiario, :class_name => "Persona", :foreign_key => "beneficiario_id"

  #Validaciones
  validates_presence_of :garante_id, :beneficiario_id, :fecha_alta, :fecha_tope, :monto
end
